#!/usr/bin/python

import cPickle
from utils import *
from search_inver import *
from eightpuzzle_inver import *


if (__name__=="__main__"):
	state = (3, 1, 2, 0, 8, 4, 6, 7, 5)
	# (5, 1, 2, 3, 4, 0, 6, 7, 8) 
	# Original (5, 1, 2, 3, 4, 0, 6, 7, 8) 53 New      28 d 11
	# Original (4, 3, 5, 2, 1, 0, 6, 7, 8) 28 New      12 d 11
	#state = (1,0,2,3,8,4,6,7,5)
	state = (5, 1, 2, 3, 4, 0, 6, 7, 8)
	pkl_file = open('newninepuzzle', 'rb')
	d = cPickle.load(pkl_file)
	instance = EightPuzzle( state , d )
	a = astar_search( instance , instance.manhattan )
	#print a.path()
	#print "-----------------------"
	instance2 = EightPuzzle( state , d )
	b = astar_search2( instance2 , d, instance2.manhattan )
	